<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>局部定义组件</title>
  <script src="../vue.js"></script>
</head>
<body>
  <div id="app">
    <child-component></child-component>
    <grand-son></grand-son>
  </div>
  <script type="module">
    import { childComponent } from './child-component.js'
    import grandSon from './grandson-component.js'
    new Vue({
      el: '#app',
      components: {
        'grand-son': grandSon,
        'child-component': childComponent
      }
    })
  </script>
</body>
</html>